package work.huangxin.share.domain.other;

import cn.hutool.core.date.DateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

@Data
@Table(name = "`article_message`")
public class ArticleMessage {
    @Id
    @Column(name = "`article_id`")
    private Integer articleId;

    @Column(name = "`article_content`")
    private String articleContent;

    @Column(name = "`user_id`")
    private Integer userId;

    @Column(name = "`theme_id`")
    private Integer themeId;

    @Column(name = "`create_time`")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    @Column(name = "`total_likes`")
    private Integer totalLikes;
    @Column(name = "`total_comment`")
    private Integer totalComment;
    @Column(name = "`total_view`")
    private Integer totalView;
    @Column(name = "`campus_id`")
    private Integer campusId;

    public void setTotalView(Integer totalView) {
        this.totalView = totalView;
    }

    private UserMessage userMessage;

    private ThemeMessage themeMessage;

    private List<CommentMessage> commentMessages;

}